package top.ucat.x.system.service.management;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.ucat.box.starter.mybatis.plus.base.service.BaseCrudServiceImpl;
import top.ucat.x.system.dao.api.SysRoleGroupDao;
import top.ucat.x.system.entity.SysRoleGroup;

import java.util.List;

/**
 * @Auther: Jun
 * @Date: 2020/4/21 17:43
 * @Description:
 */
@Service
public class SysRoleGroupServiceImpl extends BaseCrudServiceImpl<SysRoleGroup> implements SysRoleGroupService {

    @Autowired
    private SysRoleGroupDao sysRoleGroupDao;

    @Override
    public List<SysRoleGroup> getAllGroup() {
        List<SysRoleGroup> list = sysRoleGroupDao.list(sysRoleGroupDao.getWrapper().lambda()
                .orderByAsc(SysRoleGroup::getCreateTime));
        return list;
    }
}
